      SUBROUTINE PLOTF
C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C                                                                     C
C     PLOTF IS THE EXECUTIVE SUBROUTINE FOR PRINTER PLOTS.            C
C     IT ALSO CALLS EXCSD FOR FFT ANALYSIS.                           C
C     LATEST MODIFICATIONS AS OF SEPT. 1977.                          C
C                                                                     C
CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
C
      IMPLICIT REAL*8 (A-H,O-Z)
C
      COMPLEX*16 BLANK/'                '/
C
      COMPLEX*16 HEXTTL
C
      COMPLEX*16 AOPT
C
      COMPLEX*16 TITLE1(10)
     * /'DAMPER ELEM. 1  ','DAMPER ELEM. 2  ','DAMPER ELEM. 3  ',
     *  'DAMPER ELEM. 4  ','DAMPER ELEM. 5  ','DAMPER ELEM. 6  ',
     *  'DAMPER ELEM. 7  ','DAMPER ELEM. 8  ','DAMPER ELEM. 9  ',
     *  'DAMPER ELEM. 10 '/
C
      COMPLEX*16 TITLE2(10)
     * /'FLEX. ELEM.  1  ','FLEX. ELEM.  2  ','FLEX. ELEM.  3  ',
     *  'FLEX. ELEM.  4  ','FLEX. ELEM.  5  ','FLEX. ELEM.  6  ',
     *  'FLEX. ELEM.  7  ','FLEX. ELEM.  8  ','FLEX. ELEM.  9  ',
     *  'FLEX. ELEM.  10 '/
C
      COMMON /IMAIN1/ IDATE,LSAVE,INOPT,IPLOT,NUMEQS,IPLTPE,IORB,ITAPE
C
      COMMON/INPFFT/ICSD
C
      COMMON /IPOOL1/ IGRAV,IDAMP,IK,K1,ITIM,IAB,IAPS,IBB,IBPS,NK(10),
     .                LK(10),LLK(10)
C
      COMMON /PLOTIT/ XMIN(11),XMAX(11),YMIN(11),YMAX(11),IFSCAL,
     1               KPLOTS(450)
C
      COMMON/PLTCOM/IPLMOD,IKMOD
C
C
      REAL*4 Q(2050)
      COMPLEX*8 Z(1025)
      EQUIVALENCE (Q(1),Z(1))
C
      REAL*4 T(450),BIGY(450),SMLY(450),Y(201),SY,BY
      DIMENSION X(201)
C
      DATA NPOINT /200/
C
C
C
      MDISK=IPLTPE
      REWIND MDISK
      BIGX=-1.0D25
      SMLX=1.0D25
      DO 1 I=1,450
      BIGY(I)=-1.0E25
      SMLY(I)=1.0E25
    1 CONTINUE
   29 READ(MDISK,END=30) ITAR,TTT,T
      BIGX=DMAX1(BIGX,TTT)
      SMLX=DMIN1(SMLX,TTT)
      DO 2 I=1,450
      BIGY(I)=AMAX1(BIGY(I),T(I))
      SMLY(I)=AMIN1(SMLY(I),T(I))
    2 CONTINUE
      GO TO 29
   30 CONTINUE
      DO 400 I=1,450
      IF(KPLOTS(I).EQ.0) GO TO 400
      LL=I
  403 REWIND MDISK
      ISW=0
      L3=0
      LFFT=0
  401 READ(MDISK,END=409) ITAR,TTT,T
      LFFT=LFFT+1
  414 L3=L3+1
      X(L3)=TTT
      Y(L3)=T(LL)
      Q(LFFT)=T(LL)
      IF (L3 .LE. NPOINT)  GO TO 401
  416 HEXTTL=BLANK
      IF(I.LT.11) GO TO 440
      IF(I.GT.148) GO TO 413
      ITEST=I-11
      IF(ITEST.GT.59) GO TO 420
      I1=ITEST/6+1
      HEXTTL=TITLE2(I1)
      GO TO 440
  420 CONTINUE
      ITEST=I-71
      IF(ITEST.GT.59) GO TO 422
      I1=ITEST/6+1
      HEXTTL=TITLE1(I1)
      GO TO 440
  422 CONTINUE
      I1=IKMOD
      IF(I1.GT.K1) I1=I1-K1
      HEXTTL=TITLE2(I1)
      IF(IKMOD.LE.K1) HEXTTL=TITLE1(I1)
      GO TO 440
C
 413  CONTINUE
C
      IF(I.LT.251) GO TO 440
      IF(I.GT.296) GO TO 440
      ITEST=I-251
      IF(ITEST.GT.19) GO TO 430
      I1=ITEST/2+1
      HEXTTL=TITLE1(I1)
      GO TO 440
  430 CONTINUE
      ITEST=ITEST-20
      IF(ITEST.GT.19) GO TO 435
      I1=ITEST/2+1
      HEXTTL=TITLE2(I1)
      GO TO 440
  435 CONTINUE
      I1=IKMOD
      IF(I1.GT.K1) I1=I1-K1
      HEXTTL=TITLE1(I1)
      IF(IKMOD.GT.K1) HEXTTL=TITLE2(I1)
C
  440 CONTINUE
C
      SX=SMLX
      BX=BIGX
      SY=SMLY(I)
      BY=BIGY(I)
      IF (IFSCAL .EQ. 0)  GO TO 750
      SX=XMIN(I)
      BX=XMAX(I)
      SY=YMIN(I)
      BY=YMAX(I)
  750 CONTINUE
      CALL PLOT(X,Y,BY,SY,L3,BX,SX,INOPT,I,HEXTTL,AOPT,KPLOTS(I))
  101 L3=0
      IF(ISW.EQ.1) GO TO 410
      GO TO 414
  409 ISW=1
      GO TO 416
C
  410 CONTINUE
      IF(ICSD.NE.0.AND.KPLOTS(I).GT.1)
     1       CALL EXCSD(Q,Z,I,LFFT,HEXTTL,AOPT)
C
  400 CONTINUE
      WRITE (6,531)
  531 FORMAT(' ALL PLOTS COMPLETE')
      RETURN
      END
